Deconvolution example


In [12]:
%pylab inline
from scipy.signal import deconvolve


Populating the interactive namespace from numpy and matplotlib
WARNING: pylab import has clobbered these variables: ['remainder', 'trace']
`%matplotlib` prevents importing * from pylab and numpy

Trace 2


In [49]:
!ls


ADP.ipynb		     IPSCs2.npy  NetCon to count spikes.ipynb
Deconvolution example.ipynb  IPSCs3.npy
IPSC3s.npy		     IPSCs.npy

In [50]:
# load trace
trace = np.load('IPSCs2.npy')
plt.plot(trace)
plt.ylim(-85, -65);


Select a template


In [51]:
template = trace[1000:4000]
plt.plot(template)


Out[51]:
[<matplotlib.lines.Line2D at 0x7f19ccf3cf90>]

In [52]:
quotient, remainder = deconvolve(signal = trace, divisor=template)

In [53]:
plt.plot(quotient)


Out[53]:
[<matplotlib.lines.Line2D at 0x7f19ccf2ce90>]

Trace 3


In [54]:
# load trace
trace = np.load('IPSCs3.npy')
plt.plot(trace)
plt.ylim(-85, -65);



In [55]:
quotient, remainder = deconvolve(signal = trace, divisor=template)

In [56]:
plt.plot(quotient)


Out[56]:
[<matplotlib.lines.Line2D at 0x7f19cc509bd0>]

In [ ]: